var sel_count = 0;

function sel(obj){

	if(obj.tagName=="TR"){        
		var choosed = obj.getAttribute("choosed");        
		if(choosed=="yes"){
			obj.className = obj.getAttribute("saveclassname");
			obj.setAttribute("choosed","no");
			obj.cells[0].innerHTML = "";
			sel_count--;
        }else{            
			obj.className = "choosed";
			obj.setAttribute("choosed","yes");
			obj.cells[0].innerHTML = "<img src=\"../images/check.gif\" border=0>";
			sel_count++;
        }
    }
}

function sel2(obj){
        
	if(obj.tagName=="TD"){        
		var choosed = obj.getAttribute("choosed");        
		if(choosed=="yes"){
			obj.className = obj.getAttribute("saveclassname");
			obj.setAttribute("choosed","no");
			obj.parentElement.cells[0].className = "";
			obj.parentElement.cells[0].innerHTML = "";
			sel_count--;
        }else{            
			obj.className = "choosed";
			obj.setAttribute("choosed","yes");
			obj.parentElement.cells[0].className = "choosed";
			obj.parentElement.cells[0].innerHTML = "<img src=\"../images/check.gif\" border=0>";
			sel_count++;
        }
    }
}
